A hint to create and use an index on the specified data column. The hint has specified action.

Namespace:  C1.LiveLinq.AdoNet
Assembly:  C1.LiveLinq (in C1.LiveLinq.dll)

Syntax

C#
public static T IndexedField<T>(
	this DataRow row,
	string columnName,
	IndexingHintAction action
)
Visual Basic
<ExtensionAttribute> _
Public Shared Function IndexedField(Of T) ( _
	row As DataRow, _
	columnName As String, _
	action As IndexingHintAction _
) As T

Parameters

row
Type: System.Data..::..DataRow
The data row.
columnName
Type: System..::..String
The name of the column.
action
Type: C1.LiveLinq..::..IndexingHintAction
The action specified by the hint.

Type Parameters

T
The type of the data column

Return Value

The data column value.

Remarks

Hints are used declaratively. They tell LiveLinq query optimizer to create and use an index on that column, if possible. When the query is executed, the hint method IndexedField is replaced with the standard LINQ to DataSet extension method Field. See Hints for more details.

Examples

Copy CodeC#
var query =
    from c in customersTable
    where c.IndexedField<string>("CustomerID", IndexingHintAction.Mandatory) == "ALFKI"
    select c;

See Also